Skip to content

fix(windows): add PowerShell compatibility fallbacks for ls, wc, proxy, discover, session#2728

Open
jlaportebot wants to merge 4 commits into
rtk-ai:developfrom
jlaportebot:fix/issue-1248-windows-powershell-compatibility
Open

fix(windows): add PowerShell compatibility fallbacks for ls, wc, proxy, discover, session#2728
jlaportebot wants to merge 4 commits into
rtk-ai:developfrom
jlaportebot:fix/issue-1248-windows-powershell-compatibility

Conversation

@jlaportebot

Copy link
Copy Markdown

Fixes #1248

Changes

  • ls.rs: On Windows, detect when 'ls' is not a real executable (PowerShell alias) and suggest 'rtk tree .' as native alternative
  • wc_cmd.rs: On Windows, detect when 'wc' is not available and provide PowerShell/Git Bash/WSL alternatives
  • main.rs (proxy): On Windows, warn about PowerShell aliases (ls, dir, echo, pwd, cp, mv, rm, cat, man, which) and built-ins (cd, set, exit, cls, history, alias, function) that aren't real executables
  • discover/mod.rs: On Windows, when no Claude sessions found, provide helpful info about session storage location (%USERPROFILE%.claude\projects)
  • analytics/session_cmd.rs: Same as above for session command

All changes are conditional compilation (cfg(target_os = "windows")) so they only affect Windows users.

Testing

  • All existing tests pass (2239+ tests)
  • cargo fmt --all passes
  • cargo clippy --all-targets passes

AI Disclosure

This PR was developed with AI assistance.

- Update has_limit_flag to detect -nN form (e.g., -n20)
- Update parse_user_limit to parse -nN form
- Add tests for -nN form (single and multi-digit)
- All existing tests pass

Fixes: rtk-ai#2665
…y, discover, session

Addresses issue rtk-ai#1248: RTK Windows PowerShell Compatibility Gaps

Changes:
- ls.rs: On Windows, detect when 'ls' is not a real executable (PowerShell alias) and suggest 'rtk tree .' as native alternative
- wc_cmd.rs: On Windows, detect when 'wc' is not available and provide PowerShell/Git Bash/WSL alternatives
- main.rs (proxy): On Windows, warn about PowerShell aliases (ls, dir, echo, pwd, cp, mv, rm, cat, man, which) and built-ins (cd, set, exit, cls, history, alias, function) that aren't real executables
- discover/mod.rs: On Windows, when no Claude sessions found, provide helpful info about session storage location (%USERPROFILE%\.claude\projects\)
- analytics/session_cmd.rs: Same as above for session command

All changes are conditional compilation (cfg(target_os = "windows")) so they only affect Windows users.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] RTK Windows PowerShell Compatibility Gaps

1 participant